package com.wzw.springboot.principle.use.security.repository;

import com.wzw.springboot.principle.use.security.entity.RoleMenuEntity;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author Wangzhiwen
 */
public interface RoleMenuRepository extends JpaRepository<RoleMenuEntity, Long> {

    RoleMenuEntity findByMenuIdAndRoleId(Long menuId, Long roleId);

    List<RoleMenuEntity> findAllByMenuId(Long menuId);

    List<RoleMenuEntity> findAllByRoleId(Long roleId);

}
